const path = require('path')
const webpack = require('webpack')
const base = require('./webpack.base')
const { merge } = require('webpack-merge')

module.exports = merge(base,{
  mode: 'development',
  devtool: 'source-map',
  devServer: {
    port: 8002,
    progress: true,
    contentBase: path.resolve(__dirname, '../dist'),
    proxy: {
      '/api': {
        target: 'http://localhost:5000',
        pathRewrite: {
          '/api': ''
        }
      }
    }
  },
  plugins: [
    new webpack.DefinePlugin({
      ENV: JSON.stringify('dev')
    })
  ],
 
})